<template>
    <tspan style="cursor: pointer">{{ vitalsignsvalues }}</tspan>
        
  </template>
  
  <script setup>
  import { ref } from 'vue';
  
  const props = defineProps({
    
    vitalsignsvalues: [String, Number],
    name: String,
    date: String,
    config: Object,
    isShowBalloon: Boolean,
    hideEdit: Boolean,
    hideRemove: Boolean,
    onPointEdit: Function,
    onPointRemove: Function,
    isCus: Boolean,
  });
  
  const visible = ref(false);
  const nameToUnitStr = {};
  
  const edit = (event) => {
    event.preventDefault();
    event.stopPropagation();
    if (props.onPointEdit) {
      props.onPointEdit({ value: props.vitalsignsvalues, date: props.date, name: props.name }, event);
    }
    visible.value = false;
  };
  
  const removeCallback = () => {
    visible.value = false;
  };
  
  const remove = (event) => {
    event.preventDefault();
    event.stopPropagation();
    if (props.onPointRemove) {
      props.onPointRemove(
        {
          value: props.vitalsignsvalues,
          date: props.date,
          name: props.name,
          isCus: props.isCus,
          callback: removeCallback,
        },
        event
      );
    } else {
      visible.value = false;
    }
  };
  
  const handleVisibleChange = (newVisible) => {
    visible.value = newVisible;
  };
  </script>